<template>
  <div class="text">
    <span class="title" v-if="question.isNecessary === true" style="color: salmon">*</span>
    <span class="title">{{index}}.{{question.title}}</span>
    <span class="type">&ensp;&ensp;&ensp;[评分题]</span>
    <br>
    <div >
<!--      <span>{{question.options[0].text}}&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;</span>-->
      <el-rate :model-value="score"></el-rate>

<!--      <span>{{question.options[question.options.length-1].text}}</span>-->
    </div>
  </div>
</template>

<script>
export default {
  name: "RawScore",
  data(){
    return {
      score: 0
    }
  },
  mounted() {
    this.question.options.forEach(option => {
      if(option.isChoosed){
        this.score = option.score
      }
    })
  },
  props: {
    question: Object,
    index: Number,
    time: String,

    // choice: Number
  },
}
</script>

<style scoped>
.text {
  text-align: left;
}
.title {
  font-weight: bold;
  color: black;
  font-size: 20px;
}
</style>